<template>
  <el-form ref="form" :model="form" :rules="rules" label-width="120px">
    <el-form-item label="人员添加">
      <el-select v-model="form.stepUserIds" multiple placeholder="请选择相关员工">
        <el-option
          v-for="item in stepUserOptions"
          :key="item.userId"
          :label="item.nickName"
          :value="item.userId"
        ></el-option>
      </el-select>
    </el-form-item>

    <el-form-item label="持续日期" prop="projectStartDate">
      <el-date-picker clearable
                      v-model="form.dateArray"
                      unlink-panels
                      value-format="yyyy-MM-dd"
                      type="daterange"
                      range-separator="至"
                      start-placeholder="开始日期"
                      end-placeholder="结束日期">
        >
      </el-date-picker>
    </el-form-item>

    <el-form-item label="文件上传" prop="upload">
      <span>预留</span>
    </el-form-item>

  </el-form>
</template>
<script>
export default {
  mounted() {
    // 先访问父组件的方法，将子组件的 ref 传递给父组件
    this.$parent.setFormRef(this.$refs.form);
  },
  props: {
    form: {
      type: Object,
      required: true,
    },
    stepUserOptions: {
      type: Array,
      required: true,
    },
    rules:{

    }
  },
  name: "stageCommonForm",

};
</script>

